package com.example.cloud.model.business.medical;

import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by wangtao on 2018/7/2.
 * 治疗方案-疗程
 */
@Entity(name = "treat_plan_course")
@Data
@EqualsAndHashCode(callSuper = false)
public class TreatPlanCourse extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 患者主键
    @Column(name = "patient_id")
    private Long patientId;
    // 会员主键
    @Column(name = "member_id")
    private Long memberId;
    // 主诉ID
    @Column(name = "complaint_id")
    private Long complaintId;
    // 疗程主键(基础资料)
    @Column(name = "course_id")
    private Long courseId;
    // 疗程名称(基础资料)
    @Column(name = "course_name")
    private String courseName;
    // 单价
    @Column(name = "price")
    private BigDecimal price;
    // 数量
    @Column(name = "quantity")
    private int quantity;
    // 总价
    @Column(name = "total_price")
    private BigDecimal totalPrice;
    // 实付金额
    @Column(name = "actual_amount")
    private BigDecimal actualAmount;
    // 已划扣金额
    @Column(name = "deduct_amount")
    private BigDecimal deductAmount;
    // 收费状态
    @Column(name = "charge_status", columnDefinition = "INT DEFAULT 0")
    private int chargeStatus;
    // 锁定标识
    @Column(name = "lock_flag",columnDefinition = "INT DEFAULT 0")
    private int lockFlag;
    // 状态
    @Column(name = "status", columnDefinition = "INT DEFAULT 1")
    private int status;
    // 停止时间
    @Column(name = "stop_time")
    private Date stopTime;
}
